import store from '@/store'
const directivePlugin = {
  install(Vue) {
    Vue.directive('checkBtn', {
      inserted(el, binding) {
        console.log(el)
        console.log(binding)
        const points = store.state.user.userInfo.roles.points
        if (!points.includes(binding.value)) {
          el.parentNode.removeChild(el)
          // el.remove()
        }
      }
    })
  }
}

export default directivePlugin
